<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<html:html>
<head>
	<META http-equiv=Content-Type content="text/html; charset=utf-8">
	<LINK href="../styles/stylewang.css"  type=text/css rel=stylesheet>
	<LINK href="xtree.css"  type=text/css rel=stylesheet>
	<style type="text/css">CG</style>
	<html:base/>
	<script language=javascript>
			function changeDes(){
				window.open("<%=request.getContextPath()%>/detail/edit1.jsp?op=des&eleId=<bean:write name='element' property='elementId'/>",null,'top=150,left=150,scrollbars=yes,dialog=yes,modal=yes,width=600,height=445,resizable=no');
			}
			function changeNote(){
				window.open("<%=request.getContextPath()%>/detail/edit1.jsp?op=note&eleId=<bean:write name='element' property='elementId'/>",null,'top=150,left=150,scrollbars=yes,dialog=yes,modal=yes,width=600,height=445,resizable=no');
			}
			function showFilePath(){
				
				top.B.Child.document.getElementById("fileframe").setAttribute("src",'path/<bean:write name="ElementProPath"/>?sort=dd');
			}
			var openFileId;
			function AddFile(id)
			{
				var targetId = "AddFile"+id;
				var target=document.getElementById(targetId);
				if (id==openFileId)
				{
					if(target.style.display==""|| target.style.display=="block")
					{
						target.style.display="none";
					}
					else
					{
						target.style.display="";
						
					}
				}
				else
				{
					var openFile=document.getElementById("AddFile"+openFileId);
					if(openFile!=null)
					{
						openFile.style.display="none";
					}
					target.style.display="";
					target.innerHTML="<iframe width='100%' src='intoUpload.do?elementId="+id+"'></iframe>"
					openFileId=id;
				}
			}
		</script>	
</head>
<body>
<table border="0"  width="100%" id="table1" height="90%" cellspacing="0" cellpadding="0">
	<logic:notEmpty name="ElementProPath">
	<tr height=10%>
		<td colspan="2" class="rightcenter">
			<logic:empty name="Manage">
				<a href="javascript:showFilePath();">点击查看参考文件</a>
			</logic:empty>		
			<logic:notEmpty name="Manage">
				<a href="javascript:AddFile(<bean:write name="element" property="elementId"/>);">[添加参考文件]</a>
			</logic:notEmpty>
		</td>
	</tr>
	<tr>
       	  <td id="AddFile<bean:write name="element" property="elementId"/>" colspan="2" style="display:none">
       	  </td>
  	</tr>
	</logic:notEmpty>
	
	<tr height=10% >
			<td  width="50%" class="leftcenter">&nbsp;<b><bean:message key="element.description"/></b>
				<logic:notEmpty name="Manage">
				<input type='button' Value='<bean:message key="basicmodify"/>' onClick="changeDes()"/>
				</logic:notEmpty>
			</td>
			<td  width="50%" class="rightcenter">&nbsp;<b><bean:message key="element.status"/></b>
				<logic:notEmpty name="Manage">
				<input type='button' Value='<bean:message key="basicmodify"/>' onClick="changeNote()"/>
				</logic:notEmpty>
			</td>
	</tr>
	<tr>
		<td width="50%" valign="top"  class="leftbottom" id="des">&nbsp;<bean:write name="element" property="elementDescription" filter="false"/></td>
		<td width="50%" valign="top"  class="rightbottom" id="note">&nbsp;<bean:write name="element" property="note" filter="false"/></td>
	</tr>
	


</table>
</body>
</html:html>
